/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Poppins', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    position: relative;
}

header:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 3px;
}

header h1 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    letter-spacing: 1px;
}

header p {
    color: #5d6d7e;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* 主要内容区域 */
main {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
    perspective: 1000px;
}

/* 计算器表单 */
.calculator {
    flex: 1;
    min-width: 300px;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 1px 5px rgba(0, 0, 0, 0.03);
    padding: 35px;
    transform: translateZ(0);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.calculator:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15), 0 5px 15px rgba(0, 0, 0, 0.05);
}

.calculator:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
}

label:before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #3498db, #2ecc71);
    border-radius: 50%;
    margin-right: 8px;
}

input, select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e6e6e6;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
    background-color: #f9f9f9;
    color: #2c3e50;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

input:focus, select:focus {
    border-color: #3498db;
    outline: none;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

input:hover, select:hover {
    border-color: #bdc3c7;
}

input[type="range"] {
    height: 10px;
    -webkit-appearance: none;
    margin: 15px 0;
    background: linear-gradient(to right, #e0e0e0, #e0e0e0);
    border: none;
    border-radius: 5px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #2ecc71);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

input[type="range"] + span {
    display: inline-block;
    margin-left: 15px;
    font-weight: bold;
    color: #3498db;
    background: #f0f8ff;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.9rem;
    min-width: 30px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.calculate-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #3498db, #2ecc71);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    position: relative;
    overflow: hidden;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.calculate-btn:hover {
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    transform: translateY(-2px);
}

.calculate-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
}

.calculate-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: all 0.6s;
}

.calculate-btn:hover:before {
    left: 100%;
}

/* 结果区域 */
.result {
    flex: 1;
    min-width: 300px;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1), 0 1px 5px rgba(0, 0, 0, 0.03);
    padding: 35px;
    transform: translateZ(0);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.result:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15), 0 5px 15px rgba(0, 0, 0, 0.05);
}

.result:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #e74c3c, #f39c12);
}

.result h2 {
    color: #2c3e50;
    margin-bottom: 25px;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    padding-bottom: 10px;
}

.result h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #e74c3c, #f39c12);
    border-radius: 3px;
}

.result-content {
    text-align: center;
}

.result-content.hidden {
    display: none;
}

.score-container {
    margin-bottom: 30px;
}

.score {
    font-size: 80px;
    font-weight: bold;
    background: linear-gradient(135deg, #3498db, #2ecc71);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(52, 152, 219, 0.2);
    position: relative;
    display: inline-block;
}

.score:before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.1) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.5; }
}

.score-label {
    font-size: 18px;
    color: #5d6d7e;
    font-weight: 500;
    background: #f8f9fa;
    padding: 8px 20px;
    border-radius: 30px;
    display: inline-block;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.details {
    margin: 40px 0;
    text-align: left;
    background: #f9f9f9;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.05);
}

.details h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.4rem;
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
}

.details h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #e74c3c, #f39c12);
    border-radius: 3px;
}

.details ul {
    list-style-type: none;
}

.details li {
    margin-bottom: 15px;
    padding: 12px 15px 12px 25px;
    position: relative;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.details li:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.details li:before {
    content: "";
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #2ecc71);
}

.hourly-rate {
    background: linear-gradient(135deg, #f9f9f9, #f0f0f0);
    padding: 20px;
    border-radius: 12px;
    margin-top: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-left: 4px solid #e74c3c;
    position: relative;
    overflow: hidden;
}

.hourly-rate:before {
    content: '¥';
    position: absolute;
    right: -15px;
    top: -15px;
    font-size: 100px;
    color: rgba(231, 76, 60, 0.05);
    font-weight: bold;
}

.hourly-rate p {
    margin: 8px 0;
    font-size: 1.05rem;
}

.hourly-rate span {
    font-weight: bold;
    color: #e74c3c;
    font-size: 1.3rem;
    text-shadow: 0 1px 2px rgba(231, 76, 60, 0.2);
}

/* 页脚样式 */
footer {
    text-align: center;
    padding: 30px 0;
    color: #7f8c8d;
    position: relative;
    margin-top: 20px;
}

footer:before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 3px;
}

footer p {
    font-size: 0.95rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* 响应式设计 */
@media (max-width: 768px) {
    main {
        flex-direction: column;
    }
    
    .calculator, .result {
        width: 100%;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.result-content:not(.hidden) {
    animation: fadeIn 0.6s ease-out;
}

.score-container {
    animation: scaleIn 0.8s ease-out 0.3s both;
}

.details {
    animation: fadeIn 0.6s ease-out 0.5s both;
}

.hourly-rate {
    animation: fadeIn 0.6s ease-out 0.7s both;
}